package com.rm.zeyou.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.rm.zeyou.entity.GradeConfig;
import com.rm.zeyou.response.ApiRestResponse;
import com.rm.zeyou.service.GradeConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 分成等级表 前端控制器
 * </p>
 *
 * @author YanYang
 * @since 2025-03-18 10:03:05
 */
@Api(tags = "技师分成等级相关")
@RestController
@RequestMapping("/api/gradeConfig")
public class GradeConfigController {
    @Resource
    private GradeConfigService gradeConfigService;

    @ApiOperation(value = "查询分成等级列表")
    @PostMapping("selectGradeList")
    public ApiRestResponse selectGradeList() {
        return ApiRestResponse.success(gradeConfigService.list(new LambdaQueryWrapper<GradeConfig>().orderByAsc(GradeConfig::getCreateTime)));
    }
}
